package org.xqp.pet.mapper;

import org.apache.ibatis.annotations.Param;
import org.xqp.basic.mapper.BaseMapper;
import org.xqp.pet.domain.Pet;

import java.util.List;
import java.util.Map;

public interface PetMapper extends BaseMapper<Pet> {
    void onsale(Map<String, Object> params);

    void offSale(Map<String, Object> params);

    Pet loadByIdDetail(Long id);

    //批量查询带上架的宠物列表
    List<Pet> batchSelectByIds(@Param("ids") List<Long> ids, @Param("state")int state);

    //根据宠物状态上线和宠物id获取宠物和宠物详情详情
    Pet selectByIdAndState(@Param("id")Long id,@Param("state")int state);

}
